# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-simple-term-menu
_pkgname=simple_term_menu
pkgver=1.6.6
pkgrel=1
pkgdesc='Creates simple menus for interactive command line programs.'
arch=('any')
url='https://pypi.org/project/simple-term-menu/#files'
license=('MIT')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('56a34339879ca89d914cf8301856b8109509cdffb1a19c4b01c93b6f26f3147264ca130726f1d8ba43f609e029cde704c86b75790c4224a565b2ddc38ec76897')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  find "$pkgdir" -type d -name '__pycache__' -exec rm -rf {} +
}

